package com.foreknow.dao;

import com.foreknow.bean.Guestbook;

import java.sql.SQLException;
import java.util.List;

public interface GuestbookDao {
    /**
     * 添加留言
     * @param gb
     * @return
     * @throws SQLException
     */
    public boolean save(Guestbook gb)throws SQLException;

    /**
     * 删除
     * @param id
     * @return
     * @throws SQLException
     */
    public boolean deleteById(Integer id) throws SQLException;

    /**
     * 根据id查询
     * @param id
     * @return
     * @throws SQLException
     */
    public Guestbook getQueryById(Integer id) throws SQLException;

    /**
     * 修改
     * @param gb
     * @return
     * @throws SQLException
     */
    public boolean updateObject(Guestbook gb) throws SQLException;


    /**
     * 模糊查询
     * @return
     * @throws SQLException
     */
    public List<Object> getLike(String name) throws SQLException;

    /**
     * 查询所有信息
     * @return
     * @throws SQLException
     */
    public List<Object> getAllMessage()throws SQLException;


}
